#ifndef GRASP_ITEM_H
#define GRASP_ITEM_H

#include "behaviortree_cpp/bt_factory.h"
#include "rclcpp/rclcpp.hpp"

class GraspItem : public BT::StatefulActionNode
{
  public:
    GraspItem(const std::string& name, const BT::NodeConfig& config, rclcpp::Node* node);

    static BT::PortsList providedPorts();
    BT::NodeStatus onStart() override;
    BT::NodeStatus onRunning() override;
    void onHalted() override;

  private:
    rclcpp::Node* node_;
    bool grasp_complete_;
    bool grasp_success_;
    rclcpp::TimerBase::SharedPtr timer_;
};

#endif